<!DOCTYPE html>
<html lang="en">
<head>
    {% block head %}
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>单据管理-{{ user.name }}</title>
        <link rel="icon" href="{{ url_for('static', filename="images/favicon.ico") }}">
        <link rel="stylesheet" href="{{ url_for('static', filename="css/main-style.css") }}" type="text/css">
        <link rel="stylesheet" href="{{ url_for('static', filename="css/modal-frame.css") }}" type="text/css">

    {% endblock %}
</head>
<body>
    <!--采用grid布局-->
    <!-- 最外面的容器container -->
    <div class="containerALL">
        <!-- 0.横幅item -->
        <div class="banner-item"></div>

        <!-- 1.提示信息item -->
        <div class="prompt-item">
            <span>提示信息：</span>
            <span class="g-progress">
                <span id="tips">
                    {% for message in get_flashed_messages() %}
                        {{ message }}
                    {% endfor %}
                </span>
            </span>
                <!--<span id="user-show">当前用户：
                    {% if not user.name %}
                        {{ user.name }}
                    {% else %}
                        未登陆！
                    {% endif %}
                </span>-->
                <span id="date-show">
                    {% if current_user.is_authenticated %}
                        {{ "当前登陆：[" + organization.name }} {{ current_user.name + "]" }} 当前日期: [{{ date_show }}]
                    {% else %}
                       当前日期: [{{ date_show }}]
                    {% endif %}
{#                    测试- {{ current_user.organization.name }}#}
                </span>
        </div>
        <script>

        </script>
        <!-- 提示信息结束 -->

        <!--2.导航条item-->
        <div class="nav-item">
            <nav>
                <ul>
                    <img class='avatar' alt="Avatar" src="{{ url_for('static', filename='images/avatar.jpg') }}">
                    <li><a href="{{ url_for('index') }}">HOME</a></li>
                    {% if current_user.is_authenticated %}
                        {# <li><a href="{{ url_for('settings') }}">Settings</a></li> #}
                        <li><a href="{{ url_for('logout') }}">登出</a></li>
                    {% else %}
                        <li><a href="{{ url_for('login') }}">登入</a></li>
                    {% endif %}
                </ul>
            </nav>
        </div>
        <!-- 导航条结束 -->

        <!-- 3.主要内容 -->
        <div class="item main-content-item">
            <!-- <div class="main-content-container"> -->
                <div class="item item3 mc-operation">
                    <p>操作区：</p>
                    {% block operation %}{% endblock %}
                </div>
                <div id="mc-sp" class="item item3 mc-sp">
                    <fieldset>
                        <legend>粘贴单信息：</legend>
                        {% block sp %}{% endblock %}
                    </fieldset>
                </div>
                <div class="item item3 mc-md">
                    <p>与粘贴单关联的主单信息：</p>
                    {% block detailTable1 %}{% endblock %}
                </div>
                <div class="item itme3 mc-att">
                    <p>与主单关联的附件信息：</p>
                    {% block detailTable2 %}{% endblock %}
                </div>
            <!-- </div> -->
        </div>
        <!-- 主要内容结束 -->

        <!-- 4.页脚item -->
        <div class="footer-item">
            <img class="totoro" alt='working' src="{{ url_for('static', filename='images/account.gif') }}">
            <footer><small>&copy; 2024<!--<a href="https://helloflask.com/book/3">HelloFlask</a>--></small></footer>
        </div>
        <!-- 页脚item -->
    </div>
    <div id="modal-frame-wrapper">
        <div class="modal-frame">
            <div class="modal-frame-header">
                <div class="modal-frame-title"><span>测试窗口</span></div>
                <div class="modal-frame-btnClose">
                    <input type="button"  value="XXX" onclick="closeModalFrame(document.getElementById('modal-frame-wrapper'))">
                </div>
            </div>
            <div class="modal-frame-body">测试主内容区</div>
            <div class="modal-frame-footer"></div>
        </div>
    </div>
    <script src="{{ url_for('static', filename="js/main-js.js") }}" defer></script>
</body>
</html>